import request from '@/utils/request'

// 登录方法
export function login(username, password, tenantCode) {
  const data = {
    username,
    password,
    tenantCode
  }
  return request({
    url: '/tenantapi/login/login',
    method: 'POST',
    data: data,
    headers:{
      TenantCode:tenantCode
    }
  })
}

// 获取用户详细信息
export function getInfo() {
  return request({
    url: '/tenantapi/login/getInfo',
    method: 'get'
  })
}

// 退出方法
export function logout() {
  return request({
    url: '/tenantapi/login/logout',
    method: 'POST'
  })
}